Noncontact type IC card and system thereof

ABSTRACT

In a noncontact type IC card, writing of data is executed when a voltage level of an operating voltage generated from a received power wave is a level suitable for the writing of the data to a nonvolatile memory, and it is recognized that the data write operation is normally terminated when the voltage level of the operating voltage is the level suitable for the writing of the data to the nonvolatile memory even after the writing of the data.

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application is based upon and claims the benefit of priorityfrom the prior Japanese Patent Application No. 2002-374712, filed Dec.25, 2002, the entire contents of which are incorporated herein byreference.

BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention

[0003] This invention relates to a noncontact type batteryless IC cardwhich can be used as, for example, a personal identification medium ofan entry and exit management device, a resident register card and thelike, which performs by receiving a power wave transmitted from a cardreader-writer and generating an operating voltage from the receivedpower wave, and which allows data to be written in or read from arewritable nonvolatile memory by making radio communications with thecard reader-writer, and also relates to a system of the noncontact typeIC card.

[0004] 2. Description of the Related Art

[0005] Recently, for example, a noncontact type IC card called a radiocard has been used as a personal identification medium of an entry andexit management device. The noncontact type IC card storing personalphysical characteristic information and the like is distributed to avisitor. The card collates the physical characteristic information bymaking radio communications with a card reader-writer installed at aroom entrance and controls opening and closing of an entrance door.

[0006] Such a noncontact type IC card called a radio card is typicallyin a batteryless type for the purpose of reduction of the batteryexchange operation, downsizing, decrease in manufacturing costs,extension of life and the like.

[0007] Thus, a recent noncontact type IC card is operated to receive apower wave transmitted from the card reader-writer, generate anoperating voltage from the received power wave and supply the operatingvoltage to each section.

[0008] Incidentally, in this kind of noncontact type IC card, forexample, when data is stored (written) in the nonvolatile memory on thebasis of a write instruction transmitted from the card reader-writer, amethod of writing the supplied data that should be written in thenonvolatile memory at only one time is employed.

[0009] In the conventional method, data is written in the nonvolatilememory even if the noncontact type IC card is under any conditions.However, power supply in this kind of the noncontact type IC card may beremarkably unstable in accordance with the state of the received wave.If the one-time writing is failed, the data may not be stored.

BRIEF SUMMARY OF THE INVENTION

[0010] The object of the present invention is to provide a noncontact ICcard wherein if the level of the generated operating voltage isunstable, normal data writing can be always implemented by waiting fordata writing to a memory.

[0011] A noncontact type IC card according to the present invention isconfigured to receive a power wave sent from an external device togenerate an operating voltage and perform writing of data to a memorywith the generated operating voltage. The IC card comprises a voltagedetecting section which detects a voltage level of the operating voltagegenerated from the power wave received from the external device, a writeexecuting section which executes the writing of the data to the memoryif the voltage level detected by the voltage detecting section is alevel at which normal writing to the memory can be performed; and acontrol section which detects by the voltage detecting section thevoltage level of the operating voltage obtained after the writing of thedata to the memory executed by the write executing section isterminated, and which executes again the writing of the data to thememory if the detected voltage level of the operating voltage is not apredetermined voltage level.

[0012] In addition, a noncontact type IC card of the present inventionis configured to receive a power wave sent from an external device togenerate an operating voltage and perform writing of data to a memorywith the generated operating voltage. The IC card comprises a voltagedetecting section which detects a voltage level of the operating voltagegenerated from the power wave received from the external device, a firstchecking section which detects the voltage level of the operatingvoltage by the voltage detecting section and checks whether or not thedetected voltage level of the operating voltage is a predeterminedvoltage level, when the writing of the data to the memory is started, awrite executing section which executes the writing of the data to thememory if the first checking section determines that the detectedvoltage level of the operating voltage is the predetermined voltagelevel, a second checking section which detects the voltage level of theoperating voltage obtained after the writing of the data to the memoryis terminated, by the voltage detecting section, and which checkswhether or not the detected voltage level is a predetermined voltagelevel, and a control section which executes again processings of thefirst checking section, the write executing section and the secondchecking section after waiting for a predetermined period of time, ifthe first checking section determines that the voltage level of theoperating voltage is not the predetermined voltage level or if thesecond checking section determines that the voltage level of theoperating voltage is not the predetermined voltage level.

[0013] Moreover, a noncontact type IC card of the present inventioncomprises a rewritable nonvolatile memory, an antenna which transmitsdata to an external device or receives the data therefrom, a powergenerating section which receives a power wave transmitted from theexternal device, via the antenna, and generates an operating voltagewith the received power wave, a voltage detecting section which detectsa voltage level of the operating voltage generated by the powergenerating section, a first checking section which detects by thevoltage detecting section the voltage level of the operating voltagegenerated by the power generating section and checks whether or not thedetected voltage level of the operating voltage is a predeterminedvoltage level, when a write command of the data from the external deviceto the nonvolatile memory is received via the antenna, a write executingsection which executes the writing of the data to the nonvolatile memoryif the first checking section determines that the detected voltage levelof the operating voltage is the predetermined voltage level, a secondchecking section which detects the voltage level of the operatingvoltage obtained after the writing of the data to the nonvolatile memoryexecuted by the write executing section is terminated, by the voltagedetecting section, and which checks whether or not the detected voltagelevel is a predetermined voltage level, and a control section whichexecutes again processings of the first checking section, the writeexecuting section and the second checking section after waiting for apredetermined period of time, if the first checking section determinesthat the voltage level of the operating voltage is not the predeterminedvoltage level or if the second checking section determines that thevoltage level of the operating voltage is not the predetermined voltagelevel.

[0014] A noncontact type IC card system of the present inventioncomprises an external device which requests writing of data, and anoncontact type IC card which performs writing of the data in responseto the request from the external device. The external device comprises asending section which sends a power wave for operations to the IC card,and a transmitting section which transmits a write command to the ICcard receiving the power wave for operations sent from the sendingsection. The IC card comprises a voltage detecting section which detectsa voltage level of an operating voltage generated from the power wavereceived from the external device, a first checking section whichdetects by the voltage detecting section the voltage level of theoperating voltage and checks whether or not the detected voltage levelof the operating voltage is a predetermined voltage level, when thewriting of the data to the memory is started in response to the writecommand received from the external device, a write executing sectionwhich executes the writing of the data to the memory if the firstchecking section determines that the detected voltage level of theoperating voltage is the predetermined voltage level, a second checkingsection which detects the voltage level of the operating voltageobtained after the writing of the data to the memory is terminated, bythe voltage detecting section, and which checks whether or not thedetected voltage level is a predetermined voltage level, and a controlsection which executes again processings of the first checking section,the write executing section and the second checking section afterwaiting for a predetermined period of time, if the first checkingsection determines that the voltage level of the operating voltage isnot the predetermined voltage level or if the second checking sectiondetermines that the voltage level of the operating voltage is not thepredetermined voltage level.

[0015] In addition, a noncontact type IC card system of the presentinvention comprises an external device which requests writing of data,and a noncontact type IC card which performs writing of the data inresponse to the request for the writing of data from the externaldevice. The external device comprises a sending section which sends apower wave for operations to the IC card, and a transmitting sectionwhich transmits a data write command to the IC card receiving the powerwave for operations sent from the sending section. The IC card comprisesa rewritable nonvolatile memory, an antenna which transmits data to anexternal device or receives the data therefrom, a power generatingsection which receives a power wave transmitted from the externaldevice, via the antenna, and generates an operating voltage with thereceived power wave, a voltage detecting section which detects a voltagelevel of the operating voltage generated by the power generatingsection, a first checking section which detects by the voltage detectingsection the voltage level of the operating voltage generated by thepower generating section and checks whether or not the detected voltagelevel of the operating voltage is a predetermined voltage level, when awrite command of the data from the external device to the nonvolatilememory is received via the antenna, a write executing section whichexecutes the writing of the data to the nonvolatile memory if the firstchecking section determines that the detected voltage level of theoperating voltage is the predetermined voltage level, a second checkingsection which detects the voltage level of the operating voltageobtained after the writing of the data to the nonvolatile memoryexecuted by the write executing section is terminated, by the voltagedetecting section, and which checks whether or not the detected voltagelevel is a predetermined voltage level, and a control section whichexecutes again processings of the first checking section, the writeexecuting section and the second checking section after waiting for apredetermined period of time, if the first checking section determinesthat the voltage level of the operating voltage is not the predeterminedvoltage level or if the second checking section determines that thevoltage level of the operating voltage is not the predetermined voltagelevel.

[0016] Additional objects and advantages of the invention will be setforth in the description which follows, and in part will be obvious fromthe description, or may be learned by practice of the invention. Theobjects and advantages of the invention may be realized and obtained bymeans of the instrumentalities and combinations particularly pointed outhereinafter.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING

[0017] The accompanying drawings, which are incorporated in andconstitute a part of the specification, illustrate presently preferredembodiments of the invention, and together with the general descriptiongiven above and the detailed description of the preferred embodimentsgiven below, serve to explain the principles of the invention.

[0018]FIG. 1 is a block diagram showing an example of a configuration ofa noncontact type IC card system using a noncontact type IC cardaccording to embodiments of the present invention;

[0019]FIG. 2 is a block diagram schematically showing a configuration ofthe noncontact type IC card according to the embodiments of the presentinvention;

[0020]FIG. 3 is a flowchart for explanation of write operations of datain a data memory, according to a first embodiment of the presentinvention;

[0021]FIG. 4 is a flowchart for explanation of operations at the startof a noncontact type IC card according to a second embodiment of thepresent invention;

[0022]FIG. 5 is a flowchart for explanation of operations at the writeprocessing, according to the second embodiment of the present invention;

[0023]FIG. 6 is a flowchart for explanation of operations at the startof a noncontact type IC card according to a third embodiment of thepresent invention; and

[0024]FIG. 7 is a flowchart for explanation of operations at the writeprocessing, according to the third embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

[0025] First and second embodiments of the present invention will bedescribed below with reference to drawings.

[0026]FIG. 1 shows an example of a configuration of a noncontact type ICcard system using a noncontact type IC card according to first andsecond embodiments of the present invention.

[0027] The noncontact type IC card system comprises a noncontact type ICcard 11, a card reader-writer 12, a terminal device 13, a keyboard 14, aCRT display section 15, a printer 16 and the like.

[0028] The noncontact type IC card 11 and the card reader-writer 12 makeradio communications with each other. The terminal device 13 such as apersonal computer is connected to the card reader-writer 12. Thekeyboard 14, a CRT display section 15, a printer 16 and the like areconnected to the terminal device 13.

[0029] The card reader-writer 12 has a transmitter-receiver section 12 acomposed of a transmitter-receiver circuit and an antenna to transmitand receive a radio wave for radio communications, and the like. Forexample, the card reader-writer 12 sends a power wave for operations (aradio wave for power supply) to the noncontact type IC card 11 by thetransmitter-receiver section 12 a, transmits various operation commandssuch as a write command and the like, and receives data such as acommand response and the like from the noncontact type IC card 11.

[0030]FIG. 2 is a block diagram showing a configuration of thenoncontact type IC card 11.

[0031] As shown in FIG. 2, the noncontact type IC card 11 has atransmitting-receiving antenna 101, a modulating-demodulating section102, a CPU (central processing unit) 103, a program memory 104, aworking memory 105, a data memory 106, a power generating section 107,and a voltage detecting section 108.

[0032] The transmitting-receiving antenna 101 is an antenna whichtransmits data to the card reader-writer 12 or receives data therefrom.

[0033] The modulating-demodulating section 102 modulates the transmitteddata or demodulates the received data.

[0034] The CPU 103 performs various data processing and total control.

[0035] The program memory 104 is composed of, for example, anon-rewritable nonvolatile memory such as a mask ROM. Data is written inthe program memory 104 when the noncontact type IC card is fabricated orissued. For example, various control programs that are executed by theCPU 103 are stored in the program memory 104.

[0036] The working memory 105 is composed of, for example, a rewritablevolatile memory such as a RAM. Data in the working memory 105 is clearedwhen the power supply is turned off. The working memory 105, forexample, temporarily stores transmitted and received data, control datafor operations, setting data and the like at various processes.

[0037] The data memory 106 is composed of, for example, a nonvolatilememory such as an EEPROM in which memory contents are rewritable. Thedata memory 106 is used to store various data. For example, personalinformation of a holder of the noncontact type IC card, control datasupplied from the card reader-writer 12 or the like is stored in thedata memory 106. The data in the data memory 106 can be rewritten undercontrol of the CPU 103. For example, if a data write command (a datawrite instruction) is received from the card reader-writer 12, the datais written in the data memory 106 by the CPU 103.

[0038] The power generating section 107 generates a DC voltage from thepower wave from the card reader-writer 12 which is received by thetransmitting-receiving antenna 101. The voltage generated at the powergenerating section 107 supplied to each section inside the noncontacttype IC card as an operating voltage. The power generating section 107has a rectifier circuit and the like. The power generating section 107also generates a stabilized DC voltage by rectifying and smoothing thepower wave received by the transmitting-receiving antenna 101, by therectifier circuit.

[0039] The voltage detecting section 108 detects levels of the DCvoltages generated at the power generating section 107.

[0040] Each of the sections 102 to 108 other than thetransmitting-receiving antenna 101 is composed of one IC chip (or aplurality of IC chips), and is embedded in the card body together withthe transmitting-receiving antenna 101.

[0041] Next, the first embodiment will be explained.

[0042] The first embodiment is an operation example which is applied tothe noncontact type IC card 11 shown in FIG. 2. In the first embodiment,the operation example of writing the data to the data memory 106, in theIC card 11, will be explained.

[0043] In the first embodiment, the IC card 11 performs setting on thebasis of various set values which are preliminarily stored in the datamemory 106 and executes writing the data to the data memory 106, inresponse to the data write command from the card reader-writer 12, inthe system shown in FIG. 1.

[0044]FIG. 3 is a flowchart for explanation of write processing of datain the data memory 106, as the first embodiment.

[0045] First, it is assumed that the card reader-writer 12 and the ICcard 11 can make communications with each other. In this state, if thecard reader-writer 12 transmits the data write command, the CPU 103 ofthe IC card 11 receives the write command via the transmitting-receivingantenna 101, the modulating-demodulating section 102 and the like (stepS1).

[0046] When the CPU 103 of the IC card 11 receives the data writecommand transmitted from the card reader-writer 12 (step S1), the CPU103 temporarily stores the write data added to the write instruction inthe working memory 105 (step S2).

[0047] Next, the CPU 103 sets data (x, y) about number of times ofre-executing write processing, responding to the data write instruction,and wait period data (m, n) (step S3). The data (x, y) represents alimit of the number of times of re-executing the write processingresponding to the data write instruction. The data (m, n) represents thewait period when the write processing is re-executed. In the firstembodiment, the data (x, y) and data (m, n) is preliminarily stored inthe data memory 106. That is, the first embodiment is on theprecondition that the data (x, y) and (m, n) is stored in the datamemory 106, at least, before the data write processing is started (thedata write command is received from the card reader-writer).

[0048] Therefore, in the first embodiment, when the CPU 103 receives thedata write instruction, the CPU 103 reads the data (x, y) which ispreliminarily stored in the data memory 106 and stores the data in theworking memory 105. Thus, the data (x, y) responding to the data writeprocessing is set. Similarly, in the first embodiment, when the CPU 103receives the data write instruction, the CPU 103 reads the data (m, n)which is preliminarily stored in the data memory 106 and stores the datain the working memory 105. Thus, the data (m, n), responding to the datawrite processing, is set.

[0049] When the CPU 103 sets the data (x, y) responding to the datawrite instruction and the data (m, n), the CPU 103 detects the level ofthe operating voltage which is generated at the power generating section107, by the voltage detecting section 108. On the basis of a result ofthe detection of the voltage detecting section 108, the CPU 103 checkswhether or not the level of the operating voltage generated at the powergenerating section 107 is a level at which normal writing to the datamemory 106 can be performed (step S4).

[0050] The processing of step S4 is a function which can be implementedby the CPU 103 and also is a processing which serves as a first checkingsection. The processing of step S4 is called a pre-writing check in thefollowing explanations.

[0051] Next, if the level of the operating voltage generated at thepower generating section 107 is the level at which normal writing in thedata memory 106 can be performed, as a result of the check at step S4,the CPU 103 executes the processing of writing the write datatemporarily stored in the working memory 105 to the data memory 106(step S5). The processing of step S5 is a function which can beimplemented by the CPU 103 and also is a processing which serves as awrite executing section.

[0052] Next, when the CPU 103 terminates the write processing of stepS5, the CPU 103 detects again the level of the operating voltagegenerated at the power generating section 107 by the voltage detectingsection 108. On the basis of the result of the detection of the voltagedetecting section 108, the CPU 103 checks whether or not the level ofthe operating voltage generated at the power generating section 107 is alevel at which normal writing to the data memory 106 can be performed(step S6). The processing of step S6 is a function which can beimplemented by the CPU 103 and also is a processing which serves as asecond checking section. The processing of step S6 is called apost-writing check in the following explanations.

[0053] Next, if the level of the operating voltage generated at thepower generating section 107 is a level at which normal writing to thedata memory 106 can be performed, as a result of the check at step S6,the CPU 103 recognizes that the write processing has been normallyterminated and terminates the write processing (step S7).

[0054] If the CPU 103 determines as a result of the check at step S4that the level of the operating voltage generated at the powergenerating section 107 is not a level at which normal writing to thedata memory 106 can be performed, the CPU 103 waits for predeterminedperiod m (step S8). At this time, the CPU 103 sets the number of times xof re-executing the write processing that has been previously set to“−1” (step S9).

[0055] Next, the CPU 103 checks whether or not the number of times x is“0” (step S10). If the CPU 103 determines that the number of times x isnot “0”, the CPU 103 returns to step S4 and performs the processingagain from the pre-writing check. If the CPU 103 determines as a resultof checking at step S10 that the number of times x is “0”, the CPU 103recognizes that the write processing could not be normally terminated(step S11) and terminates the processing.

[0056] If the CPU 103 determines as a result of checking at step S6 thatthe level of the operating voltage generated at the power generatingsection 107 is not a level at which normal writing to the data memory106 can be performed, the CPU 103 waits for predetermined period n (stepS12). At this time, the CPU 103 sets the number of times y ofre-executing the write processing that has been previously set to “−1”(step S13).

[0057] Next, the CPU 103 checks whether or not the number of times y is“0” (step S14). If the CPU 103 determines that the number of times y isnot “0”, the CPU 103 returns to step S4 and performs the processingagain from the pre-writing check. If the CPU 103 determines as a resultof checking at step S14 that the number of times y is “0”, the CPU 103recognizes that the write processing could not be normally terminated(step S11) and terminates the processing.

[0058] In the radio card 11 of the present invention, as describedabove, the level of the operating voltage is checked before the data iswritten to the data memory 106. If the level of the operating voltage isnormal, the data is written to the data memory 106. After that, thelevel of the operating voltage is checked again. If the level of theoperating voltage is normal, it is recognized that the write operationalso has been normally terminated, and the write processing isterminated.

[0059] If the check of the operating voltage level before the writeoperation indicates that the voltage level is low, the CPU 103 returnsto the initial write operation after waiting for a certain period (m),and performs again the processing from the pre-writing check.

[0060] Even if the check of the operating voltage level after the writeoperation indicates that the voltage level is low, the CPU 103 returnsto the initial write operation after waiting for a certain period (n),and performs again the processing from the pre-writing check.

[0061] In the first embodiment, as described above, the data (x, y) and(m, n) is stored in advance in specific areas within the data memory106, respectively. Therefore, in the first embodiment, the data (x, y)and the data (m, n) can be changed by rewriting the data in the datamemory 106.

[0062] As explained above, in the noncontact type IC card according tothe first embodiment, if the voltage level of the operating voltagegenerated from the power wave received from the card reader-writer doesnot become stable, the write operation of the actual data into the datamemory composed of the nonvolatile memory is not executed until theoperating voltage generated from the received power wave reaches apredetermined voltage level.

[0063] Therefore, in the first embodiment, it is possible to wait forthe actual write operation until the operating voltage generated fromthe received power wave reaches the voltage level at which the data canbe written to the data memory composed of the nonvolatile memory. Thus,in the first embodiment, the data can be always written to the datamemory at the operating voltage of an appropriate voltage level, andnormal writing of the data can be implemented.

[0064] In addition, in the noncontact type IC card according to thefirst embodiment, the writing of the data to the data memory composed ofthe nonvolatile memory is performed with the operating voltage generatedby the power wave received from the card reader-writer. If the operatingvoltage is not at a predetermined voltage level after the writing of thedata is terminated the CPU 103 re-executes the writing of the data afterwaiting for a predetermined period.

[0065] Thus, in the first embodiment, if the voltage level of theoperating voltage is not a predetermined voltage level when the writingof the data to the data memory composed of the nonvolatile memory isterminated, the writing of the data can be re-executed. As a result,write error of the data to the data memory can be prevented and thewriting of the data thereto can be certainly executed, in the firstembodiment.

[0066] Therefore, in the noncontact type IC card of a batteryless type,according to the first embodiment, the writing can be executed at anopportunity suitable for the writing of data to the nonvolatile memory,by monitoring the voltage level of the operating voltage generated fromthe received power wave.

[0067] Moreover, it is possible to recognize that the write operation ofthe data to the nonvolatile memory has been normally terminated, bymonitoring the voltage level of the operating voltage after the writingof data to the nonvolatile memory.

[0068] In the above-described first embodiment, the operations of thenoncontact type IC card 11 have been explained. In the following secondand third embodiments, operations of a noncontact type IC card systemcomposed of the card reader-writer 12 and the IC card 11 will beexplained.

[0069] First, the second embodiment will be explained.

[0070] The second embodiment is a first operation example applied to thenoncontact type IC card system composed of the card reader-writer 12 andthe noncontact type IC card 11 as shown in FIG. 1.

[0071] In the second embodiment, when the IC card 11 is started (whenthe power is turned on), setting data for the write processing of thedata to the data memory 106, which is prestored in the data memory 106,is read and set. That is, in the second embodiment, when the IC cardreceives the power wave for operations from the card reader-writer 12,the IC card performs initialization (start operations) of its own card,reads the setting data used for the write processing of the data to thedata memory 106, which is prestored in the data memory 106, and sets thedata.

[0072]FIGS. 4 and 5 are flowcharts for explanation of operations of thesecond embodiment.

[0073]FIG. 4 is a flowchart for explanation of the operations of thesecond embodiment which sets the data used for the write processing tothe data memory 106 when the IC card is started. FIG. 5 is a flowchartfor explanation of the operations of the IC card started by theoperations shown in FIG. 4 and the operations of the card reader-writer12.

[0074] First, the IC card 11 is made to approach a predeterminedcommunication position of the card reader-writer 12. Then, a magneticfield is generated between the IC card 11 and the card reader-writer 12,such that the IC card 11 can receive the radio wave from the cardreader-writer 12. In this state, the card reader-writer 12 sends thepower wave for operations by the transmitter-receiver section 12 acomposed of a transmitter-receiver circuit and an antenna (step S21).

[0075] On the other hand, the IC card 11 receives the power wave sentfrom the card reader-writer 12, by the transmitting-receiving antenna101 (step S22), and generates an operating voltage by the powergenerating section 107 (step S23). When the operating voltage isgenerated from the power wave transmitted from the card reader-writer12, the power generating section 107 supplies the generated operatingvoltage to each section in the IC card 11. Thus, the power of the ICcard 11 is turned on (step S24).

[0076] When the power of the IC card 11 is turned on, the CPU 103performs initialization (startup) of the entire body of the IC card onthe basis of an initialization program stored in the program memory 104(step S25).

[0077] When the initialization is terminated, the CPU 103 reads the data(x, y) about the number of times of re-executing write processing andthe wait period data (m, n), from the data memory 106, as the settingdata used for the write processing of the data to the data memory 106,and stores the data into the working memory 105. Thus, the data (x, y)and (m, n) is set in the IC card 11, as the setting data used for thewrite processing of the data to the data memory 106 (step S26).

[0078] It is assumed here that the setting data used for the writeprocessing such as the data (x, y) and the data (m, n) is preliminarilystored in the data memory 106.

[0079] When the setting data used for the write processing is set, theCPU 103 transmits a response which indicates completion of theinitialization of the IC card 11 to the card reader-writer 12, by themodulating-demodulating section 102 and the transmitting-receivingantenna 101 (step S27).

[0080] When the card reader-writer 12 receives the response transmittedfrom the IC card 11 at step S27, the card reader-writer 12 becomescapable of making communications with the IC card 11 (step S28). In thisstate, the card reader-writer 12 can transmit commands (operationcommands) to request various operations to the IC card 11.

[0081] That is, when steps S21 to S28 have been completed, the cardreader-writer 12 becomes capable of supplying the write command torequest the writing of the data to the data memory 106, to the IC card11.

[0082] Next, operations in a case where the data write command (datawrite instruction) is transmitted from the card reader-writer 12 to theIC card 11 when steps S21 to S28 have been completed, will be explained.

[0083] First, as shown in FIG. 5, the card reader-writer 12 transmitsthe data write command to the IC card 11 (step S31). The data writecommand is supplied to the CPU 103 via the transmitting-receivingantenna 101 and the modulating-demodulating section 102 of the IC card11. Thus, the CPU 103 executes the write processing of the data to thedata memory 106 as explained in the first embodiment (step S32).

[0084] In the second embodiment, however, the setting data used for thewrite processing of the data to the data memory 106 is set when the ICcard 11 is started (when the power is turned on). For this reason, inthe second embodiment, the write processing of the data to the datamemory 106 is executed on the basis of the data which has already beenset. That is, the processings other than step S3 (steps S1-S2 and stepsS4-S11) shown in FIG. 3 are executed as a processing of step S32.

[0085] When the write processing as described above has been terminated,the CPU 103 transmits the data indicating a result of the writeprocessing to the card reader-writer 12, as a response to the writecommand (step S33). In the write processing of step S32, for example,the CPU 103 transmits the data indicating normal termination if thewriting is normally terminated, or the data indicating abnormaltermination if the writing is abnormally terminated.

[0086] When the card reader-writer 12 receives such data indicating aresult of the write processing from the IC card 11 (step S34), the writeprocessing of the data in the IC card system is completed.

[0087] According to the second embodiment, as described above, when theIC card starts up by receiving the power wave from the cardreader-writer, the IC card sets the data used for the write processingof the data together with the initialization. In other words, the dataused for the write processing of the data is set as one of initializingprocessings which start up the IC card, in the second embodiment.

[0088] Thus, the data used for the write processing of the data does notneed to be set until the power is turned off, in the IC card which isonce started. For example, if a plurality of data write commands areexecuted after the startup, setting the data for each of the writecommands does not need to be executed. Therefore, the processing time inthe IC card system can be reduced.

[0089] Next, the third embodiment will be explained.

[0090] The third embodiment is a second operation example applied to thenoncontact type IC card system composed of the card reader-writer 12 andthe noncontact type IC card 11 as shown in FIG. 1.

[0091] On the basis of the setting data transmitted from the cardreader-writer 12 to the noncontact type IC card 11 together with thedata write command, various data used for the write processing of datato the data memory 106 of the IC card is set, in the third embodiment.

[0092] That is, in the third embodiment, the card reader-writer 12transmits the setting data used for the write processing of data to thedata memory 106 of the IC card, together with the data write command.The IC card receives the setting data transmitted from the cardreader-writer 12 together with the data write command, and sets the dataused for the write processing of data to the data memory 106.

[0093]FIGS. 6 and 7 are flowcharts for explanation of the operations ofthe third embodiment.

[0094]FIG. 6 is a flowchart for explanation of the operations at thestart of the IC card. FIG. 7 is a flowchart for explanation of writeoperations in the third embodiment, made by the IC card 11 started bythe operations of FIG. 6 and the card reader-writer 12.

[0095] In the operations at the start of the IC card 11 in the thirdembodiment, as shown in FIG. 6, setting the data is excluded from theoperations at the start of the IC card 11, in the second embodiment, asshown in FIG. 4. That is, the operations at the start of the IC card 11in the third embodiment, as represented at steps S41-S47 of FIG. 6, arethe same as those in the second embodiment, as represented at stepsS21-S25 and S27-S28 of FIG. 4. Therefore, the detailed descriptions ofsteps S41-S47 of FIG. 6 will be omitted.

[0096] When the processings of steps S41-S47 have been terminated, theIC card 11 and the card reader-writer 12 become capable of makingcommunications with each other. In this state, the card reader-writer 12can transmit commands (operation commands) to request various operationssuch as the data write command to the IC card 11.

[0097] The card reader-writer 12 transmits the data write command to theIC card 11, and the write processing of the noncontact type IC cardsystem as shown in FIG. 7 is started.

[0098] That is, the card reader-writer 12 first sets the setting dataused for the write processing of data to the data memory 106 togetherwith the data which should be written in the data memory 106, in thedata write command (step S51). For example, the data (x, y) and (m, n)is set in the write command as the setting data.

[0099] The setting data such as the data (x, y) and the data (m, n) isset by the terminal device 13 connected to the card reader-writer 12.That is, the setting data such as the data (x, y) and the data (m, n)which is to be set in the write command can be changed by the terminaldevice 13 connected to the card reader-writer 12.

[0100] Thus, the setting data which is to be set in the write command bythe operations using the keyboard 14 or the like (the setting data usedfor the write processing of the data in the IC card) can easily bechanged in the third embodiment.

[0101] If the data write command including the setting data is generatedat step S51, the card reader-writer 12 transmits the write command tothe IC card 11 by the transmitter-receiver section 12 a (step S52).

[0102] When the data write command including the setting data istransmitted from the card reader-writer 12, the IC card 11 receives thewrite command by the transmitting-receiving antenna 101 and themodulating-demodulating section 102.

[0103] When the write command is received, the CPU 103 of the IC card 11extracts the setting data (data (x, y) and data (m, n)) included in thewrite command and stores the extracted data to the working memory 105.

[0104] Thus, the data (x, y) and the data (m, n) is set as the settingdata used for the write processing of data to the data memory 106, inthe IC card 11 (step S53).

[0105] When the setting of the setting data (data (x, y) and data (m,n)) has been completed at step S53, the CPU 103 executes the writeprocessing of data to the data memory 106 as described in the firstembodiment (step S54).

[0106] In the third embodiment, however, the setting data used for thewrite processing of data to the data memory 106 is set when the datawrite command is received. For this reason, the write processing isexecuted at step S54, on the basis of the setting data which is set atstep S53, in the third embodiment. That is, the processings (steps S1-S2and steps S4-S11) other than step S3 shown in FIG. 3 are executed as theprocessing of step S54.

[0107] When the above-described write processing has been terminated,the CPU 103 transmits the data indicating the result of the writeprocessing to the card reader-writer 12, as a response to the writecommand (step S55). In the write processing of step S54, for example,the CPU 103 transmits the data indicating normal termination if thewriting is normally terminated or the data indicating abnormaltermination if the writing is abnormally terminated.

[0108] When the card reader-writer 12 receives the data indicating sucha write result from the IC card 11 (step S56), the data write processingin the noncontact type IC card system is completed.

[0109] According to the third embodiment, as described above, the cardreader-writer sets the setting data used for the write processing ofdata in the IC card, in the data write command, and transmits the datato the IC card. The IC card sets the setting data included in the writecommand of the data received from the card reader-writer and executesthe writing of the data to the data memory of the IC card.

[0110] Therefore, the setting data used for the data write processingdoes not need to be stored in the IC card. As the setting data caneasily be changed by using the keyboard or the like, on the cardreader-writer side, the setting data which is to be set every time thewrite command is transmitted can easily be changed. Moreover, as thesetting data can be changed on the card reader-writer side, the settingdata does not need to be individually changed for each IC card andflexible operations of the noncontact type IC card system can beimplemented in the system having a plurality of noncontact type ICcards.

[0111] Additional advantages and modifications will readily occur tothose skilled in the art. Therefore, the invention in its broaderaspects is not limited to the specific details and representativeembodiments shown and described herein. Accordingly, variousmodifications may be made without departing from the spirit or scope ofthe general inventive concept as defined by the appended claims andtheir equivalents.

What is claimed is:
 1. A noncontact type IC card, receiving a power wavesent from an external device to generate an operating voltage, andwriting data to a memory with the generated operating voltage, the ICcard comprising: a voltage detecting section which detects a voltagelevel of the operating voltage generated from the power wave receivedfrom the external device; a write executing section which executes thewriting of the data to the memory if the voltage level detected by thevoltage detecting section is a level at which normal writing to thememory can be performed; and a control section which detects by thevoltage detecting section the voltage level of the operating voltageobtained after the writing of the data to the memory executed by thewrite executing section is terminated, and which executes again thewriting of the data to the memory if the detected voltage level of theoperating voltage is not a predetermined voltage level.
 2. A noncontacttype IC card, receiving a power wave sent from an external device togenerate an operating voltage, and writing data to a memory with thegenerated operating voltage, the IC card comprising: a voltage detectingsection which detects a voltage level of the operating voltage generatedfrom the power wave received from the external device; a first checkingsection which detects the voltage level of the operating voltage by thevoltage detecting section and checks whether or not the detected voltagelevel of the operating voltage is a predetermined voltage level, whenthe writing of the data to the memory is started; a write executingsection which executes the writing of the data to the memory if thefirst checking section determines that the detected voltage level of theoperating voltage is the predetermined voltage level; a second checkingsection which detects the voltage level of the operating voltageobtained after the writing of the data to the memory is terminated, bythe voltage detecting section, and which checks whether or not thedetected voltage level is a predetermined voltage level; and a controlsection which executes again processings of the first checking section,the write executing section and the second checking section afterwaiting for a predetermined period of time, if the first checkingsection determines that the voltage level of the operating voltage isnot the predetermined voltage level or if the second checking sectiondetermines that the voltage level of the operating voltage is not thepredetermined voltage level.
 3. The IC card according to claim 2,wherein if the control section executes again the checking of the firstchecking section or the second checking section after waiting for thepredetermined period of time and determines that the voltage level ofthe operating voltage is not the predetermined voltage level, thecontrol section terminates the writing of the data.
 4. The IC cardaccording to claim 2, wherein the predetermined period of time in whichthe control section waits can be arbitrarily changed.
 5. The IC cardaccording to claim 2, wherein the control section repeats theprocessings of the first checking section, the write executing sectionand the second checking section at a preset number of times.
 6. The ICcard according to claim 3, wherein the control section repeats theprocessings of the first checking section, the write executing sectionand the second checking section at the preset number of times.
 7. Anoncontact type IC card comprising: a rewritable nonvolatile memory; anantenna which transmits data to an external device or receives the datatherefrom; a power generating section which receives a power wavetransmitted from the external device, via the antenna, and generates anoperating voltage with the received power wave; a voltage detectingsection which detects a voltage level of the operating voltage generatedby the power generating section; a first checking section which detectsby the voltage detecting section the voltage level of the operatingvoltage generated by the power generating section and checks whether ornot the detected voltage level of the operating voltage is apredetermined voltage level, when a write command of the data from theexternal device to the nonvolatile memory is received via the antenna; awrite executing section which executes the writing of the data to thenonvolatile memory if the first checking section determines that thedetected voltage level of the operating voltage is the predeterminedvoltage level; a second checking section which detects the voltage levelof the operating voltage obtained after the writing of the data to thenonvolatile memory executed by the write executing section isterminated, by the voltage detecting section, and which checks whetheror not the detected voltage level is a predetermined voltage level; anda control section which executes again processings of the first checkingsection, the write executing section and the second checking sectionafter waiting for a predetermined period of time, if the first checkingsection determines that the voltage level of the operating voltage isnot the predetermined voltage level or if the second checking sectiondetermines that the voltage level of the operating voltage is not thepredetermined voltage level.
 8. The IC card according to claim 7,wherein if the control section executes again the checking of the firstchecking section or the second checking section after waiting for thepredetermined period of time and determines that the voltage level ofthe operating voltage is not the predetermined voltage level, thecontrol section terminates the writing of the data.
 9. The IC cardaccording to claim 7, wherein the predetermined period of time in whichthe control section waits can be arbitrarily changed.
 10. The IC cardaccording to claim 7, wherein the control section repeats theprocessings of the first checking section, the write executing sectionand the second checking section at a preset number of times.
 11. The ICcard according to claim 8, wherein the control section repeats theprocessings of the first checking section, the write executing sectionand the second checking section at a preset number of times.
 12. Anoncontact type IC card system comprising an external device whichrequests writing of data and a noncontact type IC card which performsthe writing of the data in response to the request from the externaldevice, the external device comprising: a sending section which sends apower wave for operations to the IC card; and a transmitting sectionwhich transmits a write command to the IC card receiving the power wavefor operations sent from the sending section, the IC card comprising: avoltage detecting section which detects a voltage level of an operatingvoltage generated from the power wave received from the external device;a first checking section which detects by the voltage detecting sectionthe voltage level of the operating voltage and checks whether or not thedetected voltage level of the operating voltage is a predeterminedvoltage level, when the writing of the data to the memory is started inresponse to the write command received from the external device; a writeexecuting section which executes the writing of the data to the memoryif the first checking section determines that the detected voltage levelof the operating voltage is the predetermined voltage level; a secondchecking section which detects the voltage level of the operatingvoltage obtained after the writing of the data to the memory isterminated, by the voltage detecting section, and which checks whetheror not the detected voltage level is a predetermined voltage level; anda control section which executes again processings of the first checkingsection, the write executing section and the second checking sectionafter waiting for a predetermined period of time, if the first checkingsection determines that the voltage level of the operating voltage isnot the predetermined voltage level or if the second checking sectiondetermines that the voltage level of the operating voltage is not thepredetermined voltage level.
 13. The system according to claim 12,wherein the IC card further comprises a setting section which sets thepredetermined period of time in which the control section waits, inaccordance with data prestored in the memory when the IC card starts byreceiving the power wave for operations sent from the sending section ofthe external device.
 14. The system according to claim 12, wherein thetransmitting section of the external device transmits data representingthe predetermined period of time in which the control section of the ICcard waits in the processing, together with the data write command, andthe IC card further comprises a setting section which sets thepredetermined period of time in which the control section waits in theprocessing, in accordance with data transmitted from the transmittingsection of the external device together with the data write command. 15.The system according to claim 12, wherein the IC card further comprisesa setting section which sets number of times at which the processings ofthe first checking section, the write executing section and the secondchecking section are repeated in accordance with data prestored in thememory when the IC card starts by receiving the power wave foroperations sent from the sending section of the external device, and thecontrol section repeats the processings of the first checking section,the write executing section and the second checking section at thenumber of times which is set by the setting section.
 16. The systemaccording to claim 12, wherein the transmitting section of the externaldevice transmits data indicating the number of times at which the ICcard repeats the processings of the first checking section, the writeexecuting section and the second checking section, together with thedata write command, the IC card further comprises a setting sectionwhich sets the number of times at which the processings of the firstchecking section, the write executing section and the second checkingsection are repeated in accordance with the data transmitted from thetransmitting section of the external device together with the data writecommand, and the control section repeats the processings of the firstchecking section, the write executing section and the second checkingsection at the number of times which is set by the setting section. 17.A noncontact type IC card system comprising an external device whichrequests writing of data and a noncontact type IC card which performsthe writing of the data in response to the request for the writing ofdata from the external device, the external device comprising: a sendingsection which sends a power wave for operations to the IC card; and atransmitting section which transmits a data write command to the IC cardreceiving the power wave for operations sent from the sending section,the IC card comprising: a rewritable nonvolatile memory; an antennawhich transmits data to an external device or receives the datatherefrom; a power generating section which receives a power wavetransmitted from the external device, via the antenna, and generates anoperating voltage with the received power wave; a voltage detectingsection which detects a voltage level of the operating voltage generatedby the power generating section; a first checking section which detectsby the voltage detecting section the voltage level of the operatingvoltage generated by the power generating section and checks whether ornot the detected voltage level of the operating voltage is apredetermined voltage level, when a write command of the data from theexternal device to the nonvolatile memory is received via the antenna; awrite executing section which executes the writing of the data to thenonvolatile memory if the first checking section determines that thedetected voltage level of the operating voltage is the predeterminedvoltage level; a second checking section which detects the voltage levelof the operating voltage obtained after the writing of the data to thenonvolatile memory executed by the write executing section isterminated, by the voltage detecting section, and which checks whetheror not the detected voltage level is a predetermined voltage level; anda control section which executes again processings of the first checkingsection, the write executing section and the second checking sectionafter waiting for a predetermined period of time, if the first checkingsection determines that the voltage level of the operating voltage isnot the predetermined voltage level or if the second checking sectiondetermines that the voltage level of the operating voltage is not thepredetermined voltage level.
 18. The system according to claim 17,wherein the IC card further comprises a setting section which sets thepredetermined period of time in which the control section waits, inaccordance with data prestored in the memory when the IC card starts byreceiving the power wave for operations sent from the sending section ofthe external device.
 19. The system according to claim 17, wherein thetransmitting section of the external device transmits data representingthe predetermined period of time in which the control section of the ICcard waits in the processing, together with the data write command, andthe IC card further comprises a setting section which sets thepredetermined period of time in which the control section waits in theprocessing, in accordance with data transmitted from the transmittingsection of the external device together with the data write command. 20.The system according to claim 17, wherein the IC card further comprisesa setting section which sets number of times at which the processings ofthe first checking section, the write executing section and the secondchecking section are repeated in accordance with data prestored in thememory when the IC card starts by receiving the power wave foroperations sent from the sending section of the external device, and thecontrol section repeats the processings of the first checking section,the write executing section and the second checking section at thenumber of times which is set by the setting section.
 21. The systemaccording to claim 17, wherein the transmitting section of the externaldevice transmits data indicating the number of times at which the ICcard repeats the processings of the first checking section, the writeexecuting section and the second checking section, together with thedata write command, the IC card further comprises a setting sectionwhich sets the number of times at which the processings of the firstchecking section, the write executing section and the second checkingsection are repeated is in accordance with the data transmitted from thetransmitting section of the external device together with the data writecommand, and the control section repeats the processings of the firstchecking section, the write executing section and the second checkingsection at the number of times which is set by the setting section.